﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Red_Gun
{
    public class Being : Frame
    {
        public const int maxBeings = 32;
        public static Being[] allBeings = new Being[maxBeings];
        //private static int index;

        private int mhp;
        private int chp;

        public Being()
        {
            // if no parameters . . . ?
            mhp = 40;
            chp = mhp;
            
            //this.indexID = index;
            //allBeings[this.indexID] = this;
            //index++;
        }

        public void takeDamage(int amt)
        {
            if (chp >= amt)
            {
                this.chp -= amt;
            }
            else
            {
                this.killThis();
            }
        }

        public void fullHeal()
        {
            chp = mhp;
        }

        protected void killThis()
        {
            // possibly play animation?
            myArray[this.indexID] = null;   
        }

    }
}
